using System;
using System.Collections.Generic;
using System.Text;

namespace TestPhorm
{
    /// <summary>
    /// A test program that runs test cases.
    /// </summary>
    class Program
    {
        /// <summary>
        /// Main function called at runtime.
        /// </summary>
        /// <param name="args">Any arguments passed in at runtime</param>
        static void Main(string[] args)
        {
            ConsoleKeyInfo key = new ConsoleKeyInfo();
            do
            {
                List<string> Choices = new List<string>();
                Choices.Add("1");
                Choices.Add("2");
                Choices.Add("3");
                Choices.Add("Q");
                bool firstLoop = true;
                do
                {
                    Console.Clear();
                    Console.WriteLine("Which test would you like to run?");
                    Console.WriteLine("    1) Test 1");
                    Console.WriteLine("    2) Test 2");
                    Console.WriteLine("    3) Test 3");
                    Console.WriteLine("    Q) Quit");
                    if (!firstLoop)
                        Console.WriteLine("\nInvalid Choice");
                    else
                        firstLoop = false;
                } while (!Choices.Contains((key = Console.ReadKey()).KeyChar.ToString().ToUpper()));
                Console.Clear();

                switch (key.KeyChar)
                {
                    case '1':
                        Test1.runTest();
                        break;
                    case '2':
                        Test2.runTest();
                        break;
                    case '3':
                        Test3.runTest();
                        break;
                }
            } while(key.KeyChar.ToString().ToUpper() != "Q");
        }
    }
}
